package com.general.framework.qinyi.event.inner;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.event.ContextClosedEvent;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Component
public class SpringInnerEventListener {
    /**
     * 处理上下文刷新事件，会根据监听的事件类型自动调用，这里的事件类型为 ContextRefreshedEvent
     * @param event
     */
    @EventListener
    public void handleContextRefresh(ContextRefreshedEvent event){
        System.out.println("SpringInnerEventListener handleContextRefresh");
    }
    @EventListener
    public void handleContextClose(ContextClosedEvent event){
        System.out.println("SpringInnerEventListener handleContextClose");
    }
}
